package com.yz.test.parking.http;

public enum EncodeEnum {
    UTF8("utf-8"),
    GBK("gbk"),
    GB2312("gb2312");

    private String encode;

    private EncodeEnum(String encode) {
        this.encode = encode;
    }

    public static EncodeEnum valueOfEnum(String encode) {
        if (encode.equalsIgnoreCase("utf-8")) {
            return UTF8;
        } else if (encode.equalsIgnoreCase("gbk")) {
            return GBK;
        } else {
            return encode.equalsIgnoreCase("gb2312") ? GB2312 : UTF8;
        }
    }

    public String getEncode() {
        return this.encode;
    }

    public void setEncode(String encode) {
        this.encode = encode;
    }
}



